<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>四维册—手册修改—单页修改</title>
  <%     
  	request.setCharacterEncoding("UTF-8");
	response.addDateHeader("Expires",0);
	response.setHeader("Pragma","no-cache");
    response.setHeader("Cache-Control","no-cache");
%>
	
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3" >
    <meta http-equiv="description" content="This is my page">
	<link href="css/style_right.css" type="text/css" rel="stylesheet" />
 	<SCRIPT src="js/jquery-1.4.2.min.js" type=text/javascript></SCRIPT>

	<script type="text/javascript" src="js/upload.js"></script>

<style type="text/css">
<!--
.pic {
	height: 310px;
	width: auto;
	padding-top: 5px;
	padding-right: 5px;
	padding-bottom: 5px;
	padding-left: 60px;
}
-->
</style>
  </head>
  
  <body>
  <!--============ right view start================== -->
		<div class="right">
		<div class="userL">
  			<li class="e1"><p><a href="<%=basePath %>books/books_bookList?handBook.userId=${handBook.userId}">手册列表</a>》
  			<a href="<%=basePath%>books/books_replaceBookAll?handBook.id=${handBook.id}">内容修改</a>》单页修改</p></li>
    	</div>
    <form action="<%=basePath %>picture/picture_updatePicture?handBook.id=${handBook.id}" method="post" enctype="multipart/form-data">
    
    <div class="pic">
	<input name="user.id" value="${user.id}" type="hidden"><br>

					<input name="picture.id" value="${picture.id}" type="hidden">
					<br>
    	
	<input name="picture.fileDir" value="${picture.fileDir}" type="hidden"><br>
    	
	<input name="handBook.id" value="${handBook.id}" type="hidden"><br>
	<img id="pic" src="${httpImage}/${picture.fileDir}?<%=System.currentTimeMillis()%>"></img>
	
	<div>请选择新的图片：<input type="file" name="upload" onChange="c(this)" />
	<input type="submit" value="提交"></div>
	</div> 
    </form>
    </div>
		<!--============ right view end================== -->
</body>
<script type="text/javascript">
var image =document.getElementById("pic");
var height = image.height;
var width = image.width;
if(height>200&&width>200){
	image.height =300;
	image.width =400;
}
</script>
</html>
